<template>
    <div id="VeryIntimate">
        <div class="title">
            <i class="iconfont iconzuojiantou" @click="VeryIntimate"></i>
            <span>修改昵称</span>
            <i class="iconfont iconzuojiantou" style="color: rgba(0,0,0,0);"></i>
        </div>
        <div class="VeryIntimate-Box">
            <span>昵称：</span>
            <input type="text" v-model="VeryIntimateText">
        </div>
        <div class="button">
            <button @click="GeteryIntimate">确认修改</button>
        </div>
    </div>
</template>
<script>
import { Toast } from 'vant';
export default {
    name:"VeryIntimate",
    data() {
        return {
            VeryIntimateText:"",
            VeryIntimateuserId:"",
        }
    },
    
    methods: {
        VeryIntimate(){
            this.$router.push("/MyPortrait");
        },
        GeteryIntimate(){
           this.$axios.post("/system/user/profile/update",{
               userName:this.VeryIntimateText
           }).then(res =>{
               console.log("修改数据",res);
               if(res.data.code==0){
                   Toast(res.data.msg);
                   localStorage.setItem("nickName",this.VeryIntimateText)
                   this.$router.push("/MyPortrait")
               }
           })
        }
    },
}
</script>
<style lang="less" scoped>
#VeryIntimate{
    width: 100%;
    height: 100%;
    background: rgb(248, 248, 248);
    .title{
        width: 100%;
        font-size: 0.36rem;
        color:#333333;
        height: 1.25rem;
        line-height: 1.25rem;
        display: flex;
        justify-content: space-between;
        padding: 0 0.2rem;
        box-sizing: border-box;
        background: #FFFFFF
    }
    .VeryIntimate-Box{
        width: 100%;
        height: 1.75rem;
        margin-top: 0.12rem;
        font-size: 0.28rem;
        color: #666666;
        background: white;
        font-family: "PingFang-SC-Medium";
        // box-sizing: border-box;
        span{
            display: block;
            width: 6.9rem;
            height: 0.72rem;
            line-height: 0.72rem;
            margin-left: 0.4rem;
        }
        input{
            width: 6.9rem;
            height: 0.63rem;
            // background: red;
            margin-left: 0.4rem;
            padding-left: 0.42rem; 
            border-bottom: .02rem solid rgb(206, 206, 206);
        }
    }
    .button{
        width: 100%;
        height: 2.4rem;
        font-size: 0.32rem;
        color: white;
        button{
            width: 6.9rem;
            height: 1rem;
            background: #38A83F;
            border-radius: 0.2rem;
            margin-left: 0.3rem;
            margin-top: 0.68rem;
        }
    }
}
</style>